package xmlStateMachine.commands {

	import de.ghost23.common.process.ACommand;
	import flash.utils.Dictionary;
	import xmlStateMachine.XMLStateMachine;

	public class ParseXML extends ACommand {

		public function ParseXML() {
			super();
		}

		/**
		 * Starts execution of this Command. This method has to be overridden
		 * by the subclass.
		 * @param	paramContainer Reference to the bundling Parameter Container.
		 */
		override public function execute(paramContainer:Dictionary):void {

			trace("command ParseXML is running!");
			if(paramContainer[XMLStateMachine.FILE_RAW_XML] == null) setResult(FAILURE);
			else {
				paramContainer[XMLStateMachine.PARSED_OBJECT] = new Object();
				setResult(XMLStateMachine.XML_PARSING_COMPLETE);
			}
		}
	}
}